package com.example.main.viewmodel

import androidx.lifecycle.MutableLiveData
import com.example.lib_base.entity.RegisterBean
import com.example.lib_base.mvvm.BaseViewModel
import com.example.main.Repo.PublicRepo
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@HiltViewModel
class RegisterViewModel @Inject constructor(private val repo: PublicRepo):BaseViewModel() {
    // val noticeSuccess= MutableLiveData<AnnouncementBean>()
    //    val noticeError = MutableLiveData<String>()
    //
    //    fun getNotice(page:Int,size:Int){
    //        httpRequest({repo.apiService.getAnnouncements(page, size)},{noticeSuccess.postValue(it)})
    //    }
    val registerSuccess= MutableLiveData<RegisterBean>()
    fun getRegister(username:String,password:String){
        httpRequest({repo.apiService.getRegister(username,password)},{registerSuccess.postValue(it)})
    }
}